package love.sock.model;

/**
 * @author myndel
 *
 */
public class BadRequestException extends Exception {

	private static final long serialVersionUID = -8194753586011175211L;
	private EStatus statut;
	private String motif="";
	
	public BadRequestException(EStatus statut) {
		super();
		this.statut = statut;
	}

	public BadRequestException(EStatus statut, String motif) {
		super();
		this.statut = statut;
		this.motif = motif;
	}
	
	public EStatus getStatut() {
		return statut;
	}

	public String getMotif() {
		return motif;
	}

	public void setMotif(String motif) {
		this.motif = motif;
	}

	@Override
	public String toString() {
		return "BadRequestException:"+statut +(motif.isEmpty() ? "": ": "+motif );
	}
}
